Next: , Previous: Results of evaluation, Up: Working With Source Code


14.10 Noweb reference syntax

The “noweb” (see http://www.cs.tufts.edu/~nr/noweb/) Literate Programming system allows named blocks of code to be referenced by using the familiar Noweb syntax:

     <<code-block-name>>

When a code block is tangled or evaluated, whether or not “noweb” references are expanded depends upon the value of the :noweb header argument. If :noweb yes, then a Noweb reference is expanded before evaluation. If :noweb no, the default, then the reference is not expanded before evaluation.

Note: the default value, :noweb no, was chosen to ensure that correct code is not broken in a language, such as Ruby, where <<arg>> is a syntactically valid construct. If <<arg>> is not syntactically valid in languages that you use, then please consider setting the default value.